package com.zrrd.jt_admin.express.express_company.controller;


import com.zrrd.jt_admin.common.entity.ExpressCompany;
import com.zrrd.jt_admin.common.response.ResponseResult;
import com.zrrd.jt_admin.common.vo.ExpressCompanyVo;
import com.zrrd.jt_admin.express.express_company.service.ExpressCompanyService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Zhangyk
 * @since 2024-07-01
 */
@Api(tags = "快递发货管理-接口文档")
@RestController
@RequestMapping("admin/expressCompany")
@ResponseBody
public class ExpressCompanyController {
    @Resource
    private ExpressCompanyService expressCompanyService;

    @ApiOperation(value = "快递公司列表")
    //http://localhost:80891/admin/express_company/1
    @GetMapping("{page}")
    public ResponseResult findByPage(@PathVariable Integer page, Integer limit) {
        if (limit == null) {
            limit = 5;
        }
        ExpressCompanyVo expressCompanyVo = expressCompanyService.findByPage(page, limit);
        return ResponseResult.queryResponse(expressCompanyVo);
    }
}

